import Vue from 'vue'
import VueRouter from 'vue-router'
import Home from '../views/Home.vue'
import Login from '../views/Login.vue'
import ResourceList from '../views/resource/ResourceList'
import AddResource from '../views/resource/AddResource'
import AddResourceForm from '../views/resource/AddResourceForm'
import ResourceListTui from '../views/resource/ResourceListTui'
import ResourceListFa from '../views/resource/ResourceListFa'




Vue.use(VueRouter)

const routes = [
  {
    path:'/',
    redirect:'login'
  },
  {
    name:'/等陆',
    path:'/login',
    component: Login
  },

  {
    path: '/home',
    name: 'Home',
    component: Home,children:[
      {name:'/resourcelist',path:'/resourcelist',component:ResourceList},
      {name:'/addresource',path:'/addresource',component:AddResource},
      {name:'/addResourceForm',path:'/addResourceForm',component:AddResourceForm},
      {name:'/resourceListTui',path:'/resourceListTui',component:ResourceListTui},
      {name:'/resourceListFa',path:'/resourceListFa',component:ResourceListFa},

    ]
  },

]

const router = new VueRouter({
  routes
})

export default router
